<?php
/**
 * Created by PhpStorm.
 * User: leo
 * Date: 16/3/28
 * Time: 下午1:16
 * Describe:
 */

namespace backend\components;
use yii;
use yii\helpers\Html;

class ExaminationColumn extends \yii\grid\ActionColumn
{
    public $template = '{view} {update} {delete} {examination}';


    protected function initDefaultButtons(){
        parent::initDefaultButtons();
        if (!isset($this->buttons['examination'])) {
            $this->buttons['examination'] = function ($url, $model, $key) {
                $options = array_merge([
                    'title' => Yii::t('yii', '审核'),
                    'aria-label' => Yii::t('yii', '审核'),
                    'data-pjax' => '0',
                ], $this->buttonOptions);
                return Html::a('<span class="glyphicon glyphicon-check"></span>', $url, $options);
            };
        }
    }
}

